package o;

import android.text.TextUtils;
import com.huawei.appgallery.foundation.account.bean.AccountReqBodyBean;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.jsonkit.api.JsonBean;
import com.huawei.cloudservice.CloudAccountManager;

public class efc extends cvs {
    public static final String APIMETHOD = "client.reserveApp";
    private String appId_;
    private int autoDownload_ = -1;
    private String package_;
    private int type_ = -1;

    public efc() {
        setMethod_(APIMETHOD);
        ॱ(epk.ˏ());
    }

    public efc(String str) {
        setMethod_(APIMETHOD);
        setStoreApi("clientApi");
        JsonBean accountReqBodyBean = new AccountReqBodyBean();
        if (UserSession.getInstance().isLoginSuccessful()) {
            accountReqBodyBean = epk.ˏ();
        } else if (!TextUtils.isEmpty(str)) {
            if (CloudAccountManager.getCloudAccountByUserId(ContentManager.getInstant().getContext(), str) != null) {
                accountReqBodyBean = epk.ˏ();
            } else {
                Logger.e(cvs.TAG, "can not get cloud account by userId, cloudAccount isEmpty.");
            }
        }
        ॱ(accountReqBodyBean);
    }

    public void ˏ(int i) {
        this.autoDownload_ = i;
    }

    public String ˏ() {
        return this.appId_;
    }

    public int ॱ() {
        return this.type_;
    }

    public void ˎ(int i) {
        this.type_ = i;
    }

    public String ˋ() {
        return this.package_;
    }

    public void ॱ(String str) {
        this.package_ = str;
    }
}
